package com.tueye.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.IAdinfoDao;
import com.tueye.dao.IAdsiteDao;
import com.tueye.entity.Adinfo;
import com.tueye.entity.Adsite;
import com.tueye.service.IAdinfoService;
import com.tueye.service.IAdsiteService;
import com.tueye.service.exception.TuEyeServiceException;

@Scope("prototype")
@Component("adinfoService")
public class AdinfoServiceImpl extends BaseService implements IAdinfoService{
	
	@Autowired
	@Qualifier("adinfoDao")
	private IAdinfoDao adinfoDao;
	
	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values)throws TuEyeServiceException {
		return adinfoDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}
	@Override
	public void addAdinfo(Adinfo adinfo) throws TuEyeServiceException {
		adinfoDao.addAdinfo(adinfo);
	}
	@Override
	public void delAdinfo(String id) throws TuEyeServiceException {
		adinfoDao.delAdinfo(id);
    }
	@Override
	public Adinfo getAdinfoById(String id) throws TuEyeServiceException{
		return adinfoDao.getAdinfoById(id);
	}
}